package com.guoxin.chapter3.waitnotify.stack2newfinal;

public class Run {
	public static void main(String[] args) {
		MyStack stack = new MyStack();
		Producer producer = new Producer(stack);
		Consumer consumer = new Consumer(stack);
		ThreadP tp = new ThreadP(producer);
		ThreadC tc1 = new ThreadC(consumer);
		ThreadC tc2 = new ThreadC(consumer);
		ThreadC tc3 = new ThreadC(consumer);
		ThreadC tc4 = new ThreadC(consumer);
		ThreadC tc5 = new ThreadC(consumer);
		tp.start();
		tc1.start();
		tc2.start();
		tc3.start();
		tc4.start();
		tc5.start();
	}
}
